
#include "util.h"
#include <model/Clazz.h>


/*
extern map<string,class_node*> tree;

void display_list(list<string> & l) {
	cout << "** DISPLAYING A LIST **" << endl;
	for(list<string>::iterator it = l.begin(); it != l.end(); it++)
		cout << *it << endl;
	cout << "END OF THE LIST\n" << endl;
}

void display_class(const string &class_name, class_node* node) {
	cout << "** DISPLAYING CLASS **" << endl;
	cout << "Class: " << class_name << endl;
	if(node->children->size() != 0) {
		cout << "Its children: " << endl;
		display_list(*node->children);
	}

	if(node->parents->size() != 0) {
		cout << "Its parents: " << endl;
		display_list(*node->parents);
	display_recursive(string("A"));
	}
	cout << "** END OF THE CLASS ***************************" << endl;
}

void display_fields(const string& name) {
	cout << "** DISPLAYING MEMBERS **" << endl;
	list<instance_var>* l = tree[name]->private_fields;

	if(l->size() > 0) {
		cout << "  PRIVATE: " << endl;
		for(list<instance_var>::iterator it = l->begin(); it != l->end(); it++) {
			//cout << "id: " << it->varname << ", type: " << it->tname << endl;
			qDebug() << "id: " << it->varname << ", type: " << it->tname << endl;
		}
	}

	l = tree[name]->protected_fields;
	
	if(l->size() > 0) {
		cout << "  PROTECTED: " << endl;
		for(list<instance_var>::iterator it = l->begin(); it != l->end(); it++) {
			qDebug() << "id: " << it->varname << ", type: " << it->tname << endl;
		}
	}

	l = tree[name]->public_fields;
	
	if(l->size() > 0) {
		cout << "  PUBLIC: " << endl;
		for(list<instance_var>::iterator it = l->begin(); it != l->end(); it++) {
			//cout << "id: " << it->varname << ", type: " << it->tname << endl;
			qDebug() << "id: " << it->varname << ", type: " << it->tname << endl;
		}
	}
	

}
*/

//void display_recursive(const QString & name, int depth) {
//	for(int i = 0; i < depth; cout << " ", i++);
	//cout << setfill('-') << setw(depth+name.size()) << " ";
	/*cout << name << endl;
	display_fields(name);
	
	for(list<string>::iterator it = tree[name]->children->begin(); 
		it != tree[name]->children->end(); it++) {
		display_recursive(*it, depth+1);
	}*/
//}


